package com.cloud.core.streaming

import org.apache.spark.sql.SparkSession

object SparkStreaming00_WordCount {

  def main(args: Array[String]): Unit = {

    //    val logFile = "/Users/fuhaixu/Desktop/work/program_journey/cloud_computing/github_data_analysis/data/README.md"
    // Should be some file on your system

    val spark = SparkSession
      .builder
      .appName("StructuredNetworkWordCount")
      .getOrCreate()

    val lines = spark.readStream
      .format("socket")
      .option("host", "localhost")
      .option("port", 9999)
      .load()

  }

}
